package com.imooc.sell.utils;

import com.imooc.sell.VO.ResultVo;

public class ResultVoUtil {

    public  static ResultVo success(Object object){
        ResultVo resultVo = new ResultVo();

        resultVo.setData(object);
        resultVo.setCode(0);
        resultVo.setMsg("成功");

        return  resultVo;
    }

    public  static ResultVo success(){
       return ResultVoUtil.success(null);
    }

    public static  ResultVo failed(Integer code,String msg){
        ResultVo resultVo = new ResultVo();

        resultVo.setCode(code);
        resultVo.setMsg(msg);

        return  resultVo;
    }
}
